package com.cd.order.jpa.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;
import java.util.Date;

/**
 * @Description 操作记录
 * @Author lqq
 * @Date 2025/9/7 10:10
 **/
@Entity
@Data
@Table(name = "db_order_record",
        indexes = {
                @Index(name = "idx_order_id", columnList = "order_id")})
@NoArgsConstructor
@AllArgsConstructor
public class OrderRecord {

    //ID
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    //关联订单编号
    @Column(name = "order_id")
    private Long orderId;

    //操作类别 订单创建/总金额确认/定金还是全款/付定金 付尾款 付全款 返图结束 ~~zip~~~ 网盘）
    @Column(name = "oper_type", length = 5, columnDefinition = "VARCHAR(5)")
    private String operType;

    //操作内容
    @Column(name = "oper_content", length = 500, columnDefinition = "VARCHAR(500)")
    private String operContent;

    //操作人
    @Column(name = "oper_user", length = 50, columnDefinition = "VARCHAR(50)")
    private String operUser;

    //操作时间
    @Column(name = "oper_time")
    private Date operTime;

}
